cmake_minimum_required(VERSION 3.0.0)

project(CRC
        VERSION 0.0.1
        DESCRIPTION "CRC calculation with table looking up method")

set(CMAKE_C_STANDARD 90)

set(SRC_DIR                         ${PROJECT_SOURCE_DIR}/src)
set(INCLUDE_DIR                     ${PROJECT_SOURCE_DIR}/src/include)

message("Project name:              ${PROJECT_NAME}")
message("Project description:       ${PROJECT_DESCRIPTION}")
message("Project version:           ${PROJECT_VERSION}")

message("Project source directory:  ${SRC_DIR}")
message("Project include directory: ${INCLUDE_DIR}")
message("Project binary directory:  ${PROJECT_BINARY_DIR}")

message("CMake system name:         ${CMAKE_SYSTEM_NAME}")
message("CMake C compiler:          ${CMAKE_C_COMPILER_ID}")

add_executable(test_crc8            test_crc8.c
                                    ${SRC_DIR}/crc8.c)
add_executable(test_crc16           test_crc16.c
                                    ${SRC_DIR}/crc16.c)
add_executable(test_crc32           test_crc32.c
                                    ${SRC_DIR}/crc32.c)

include_directories(${INCLUDE_DIR})
